using UnityEngine;
using GameKit.Core.Context;

namespace GameKitUnity.Core.Context
{
    public class SystemContextBehaviour : MonoBehaviour
    {
        public SystemContext Context { get; private set; }

        private void Awake()
        {
            Context = new SystemContext(gameObject.name);
        }

        private void Start()
        {
            Context.Initialize();
        }

        private void Update()
        {
            Context.OnUpdate(Time.deltaTime);
        }

        private void OnDestroy()
        {
            Context.Dispose();
        }
    }
}